#ifndef IIC_2_HPP
#define IIC_2_HPP

class IIC2{
public:
    virtual bool iicInit(void) = 0;
    virtual void iicStart(void) = 0;
    virtual void iicStop(void) = 0;
    virtual unsigned char iicSendByte(unsigned char data) = 0;
    virtual unsigned char iicReadByte(void) = 0;
    virtual unsigned char iicWaitack(void) = 0;
    virtual void iicNack(void) = 0;
    virtual void iicAck(void) = 0;

    static IIC2 * getInstance(void);
};

class _IIC2 : public IIC2{
public:
    virtual bool iicInit(void);
    virtual void iicStart(void);
    virtual void iicStop(void);
    virtual unsigned char iicSendByte(unsigned char data);
    virtual unsigned char iicReadByte(void);
    virtual unsigned char iicWaitack(void);
    virtual void iicNack(void);
    virtual void iicAck(void);

private:
    void IIC_SCL_0(void);
    void IIC_SCL_1(void);
    void IIC_SDA_0(void);
    void IIC_SDA_1(void);
    unsigned char READ_SDA(void);
    void iic_delay(void);
};





#endif
